package com.cupk.rotaryguard.monitor.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 设备信息表
 * @author tjy
 * @date 2023/3/26
 * @apiNote
 */
@TableName(value = "tb_device_info")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class DeviceInfo implements Serializable {
    private static final long serialVersionUID = -40356785423168312L;
    /**
     * 主键
     */
    @TableId
    private Long id;

    /**
     * 设备型号
     */
    private String deviceModel;

    /**
     * 频率
     */
    private BigDecimal deviceFrequency;

    /**
     * 功率
     */
    private BigDecimal devicePower;

    /**
     * 状态
     */
    private Integer status;

    /**
     * 设备创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    /**
     * 状态更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime statusTime;

    /**
     * 删除标志（0:代表未删除，1:已删除）
     */
    @TableLogic(value = "0", delval = "1")
    private Integer delFlag;

}
